"; echo ""; ?> "; echo "\"*\"/
"; echo "

"; echo xhtmlfoot(); exit(); } $sid = $_GET["sid"]; $uid = getuid_sid($sid); $descript = $_POST["descript"]; if(islogged($sid)==false) { echo xhtmlheadnotheme("$sitetitle (not logged in!)"); echo "

"; echo "You are not logged in
"; echo "Or Your session has been expired

"; echo "

"; echo "

"; echo "

"; echo xhtmlfoot(); exit(); } if(isbanned($uid)) { echo xhtmlheadnotheme("$sitetitle (BANNED!)"); echo "

"; echo "\"x\"/
"; echo "You are Banned
"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'")); $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'")); $remain = $banto[0]- time() ; $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg

"; echo "Ban Reason: $banres[0]"; echo "

"; echo xhtmlfoot(); exit(); } error_reporting(E_ALL); $userinfo = mysql_fetch_array(mysql_query("SELECT name, sex FROM ibwf_users WHERE id='".$uid."'")); $membername = $userinfo[0]; ////////////////////////////////////////UPLOADING AND HANDLING THE IMAGE if ($_POST['action'] == 'image') { addonline(getuid_sid($sid),"Uploading Photo - xHTML:v3",""); echo xhtmlheadnotheme("Uploading Photo"); echo "

"; // ---------- IMAGE UPLOAD ---------- // we create an instance of the class, giving as argument the PHP object // corresponding to the file field from the form // All the uploads are accessible from the PHP object $_FILES $handle = new Upload($_FILES['f1']); // then we check if the file has been uploaded properly // in its *temporary* location in the server (often, it is /tmp) if ($handle->uploaded) { // yes, the file is on the server // below are some example settings which can be used if the uploaded file is an image. $handle->image_resize = true; $handle->image_ratio_y = true; $handle->image_x = 200; // now, we start the upload 'process'. That is, to copy the uploaded file // from its temporary location to the wanted location // It could be something like $handle->Process('/home/www/my_uploads/'); $handle->Process('../usergallery'); // we check if everything went OK if ($handle->processed) { // everything was fine ! echo ' File uploaded with success
'; echo '
'; $info = getimagesize($handle->file_dst_pathname); $imageurl = "$imgpath/$handle->file_dst_name"; $reg = mysql_query("INSERT INTO ibwf_usergallery SET uid='".$uid."', imageurl='".$imageurl."', sex='".$userinfo[1]."', time='".time()."', descript='".$descript."'"); } else { // one error occured echo ' File not uploaded to the wanted location
'; echo ' Error: ' . $handle->error . '
'; } // we delete the temporary files $handle-> Clean(); } else { // if we're here, the upload file failed for some reasons // i.e. the server didn't receive the file echo ' File not uploaded on the server
'; echo ' Error: ' . $handle->error . ''; } echo "

"; echo "

"; echo "Home"; echo " > "; echo "Gallery"; echo " > "; echo "Uploading Photo"; echo "

"; echo xhtmlfoot(); } ?>